import request from '@/utils/request'

export function getPage(query) {
  return request({
    url: 'admin/materialgroup/page',
    method: 'get',
    params: query
  })
}

export function getList(query) {
  return request({
    url: 'admin/get-product-material-group-list',
    method: 'get',
    params: query
  })
}

export function addObj(obj) {
  return request({
    url: 'admin/create-product-material-group',
    method: 'post',
    data: obj
  })
}

export function getObj(id) {
  return request({
    url: 'admin/materialgroup/' + id,
    method: 'get'
  })
}

export function delObj(data) {
  return request({
    url: 'admin/delete-product-material-group',
    method: 'delete',
    data
  })
}

export function putObj(obj) {
  return request({
    url: 'admin/update-product-material-group',
    method: 'post',
    data: obj
  })
}
